import Vue from 'vue'
import Router from 'vue-router'
const index = resolve => require(['../views/index.vue'], resolve); // 首页
const details = resolve => require(['../views/details/details'], resolve); // 详情
const detailsMe = resolve => require(['../views/details/detailsme'], resolve); // 详情
const buySuccess = resolve => require(['../views/buySuccess/buy-success'], resolve); // 购买成功
const getFansCard = resolve => require(['../views/getFansCard/get-fans-card'], resolve); // 获取更多粉丝卡
const payFailure = resolve => require(['../views/payFailure/payFailure'], resolve); // 支付失败

Vue.use(Router);

export default new Router({
  // mode: 'history',
  routes: [
    {path: '/', name: '首页', component: index},
    {path: '/details', name: '详情', component: details},
    {path: '/detailsMe', name: '自己详情', component: detailsMe},
    {path: '/buySuccess', name: '购买成功', component: buySuccess},
    {path: '/getFansCard', name: '获取粉丝卡', component: getFansCard},
    {path: '/payFailure', name: '支付失败', component: payFailure},
    {path: '*', redirect: '/'}
  ],

})
